package com.example.config;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.context.annotation.Configuration;

/**
 * @ClassName RabbitMessageReceiver
 * @Description
 * @Author Yin
 * @Date 2021/4/12 14:00
 * @Version 1.0
 */
@Configuration
public class RabbitMessageReceiver {
    @RabbitListener(queues = {"test_queue"})
    public void receiveMsg(String msg){
        System.out.println("收到消息"+msg);
    }
}
